import {BasicBo, SearchBo} from "@/common/BasicDto.ts";
import {Column} from "@/common/Column.ts";

class UserBo extends BasicBo<UserVo> {
    public id?: number;
    public name?: string;
    public account?: string;
    public password?: string;
    public sex?:boolean;
    public age?:number;
    public balance?:number;
}

class UserVo {
    public id?: number;
    public name?: string;
    public account?: string;
    public isAdmin?: string;
    public password?: string;
    public sex?:boolean = true;
    public age?:number;
    public balance?:number;

    public static getUserColumn() {
        return [
            new Column("账号", "account"),
            new Column("姓名", "name"),
            new Column("性别", "sex"),
            new Column("年龄", "age"),
            new Column("余额", "balance"),
        ] as Array<Column>
    }
}

class UserSearchBo extends SearchBo {
    public id?: number;
}

export {UserSearchBo, UserVo, UserBo}